﻿@inherits ActionsBlock
@{
    var holder = new PlaceHolder();
    foreach (var action in Model.MasterModel.ActionsModel.Actions.Where(a => KnownQuickActions.Contains(a.ActionName)))
    {
        var imgPath = Context.CreateUrl("/i/quick/" + action.ActionName + ".png");

        holder.Add
        (
            new Anchor()
                .SetHref(CreateHref(action))
                .SetTitle(CreateTitle(action) ?? CreateText(action))
                .SetTarget(action.Target)
                .SetAttribute("data-assuremessage", Assure(action))
                .AddCssClassName(Assure(action).IsNotEmpty() ? "assure" : null)
                .SetAttribute(Attr.AccessKey, CreateAccesskey(action))
                .AddControls
                (
                    new Image(imgPath)
                        .SetAlt(CreateTitle(action) ?? CreateText(action))
                        .SetTitle(CreateTitle(action) ?? CreateText(action))
                )
        );
    }
}
@AddControls(holder)